﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StructureMap;
using mitasoft.Component.Services.Interfaces;
using mitasoft.Component.Services;

namespace mitasoft.ManagerConsole
{
    public static class IoC
    {
        public static IContainer Initialize()
        {
            ObjectFactory.Initialize(x =>
            {
                x.Scan(scan =>
                {
                    scan.TheCallingAssembly();
                    scan.WithDefaultConventions();
                });

                x.For<IBlogService>().Use<BlogService>();
                x.For<ICommonService>().Use<CommonService>();

            });
            return ObjectFactory.Container;
        }
    }
}
